﻿using System;
using Microsoft.Extensions.DependencyInjection;

namespace NiuX.AspNetCore.Middlewares.Registering;

[AttributeUsage(AttributeTargets.Class)]
public class MiddlewareRegisterAttribute : Attribute
{
    /// <summary>
    /// 注册顺序
    /// </summary>
    public int Sort { get; set; } = int.MaxValue;

    /// <summary>
    /// 生命周期
    /// </summary>
    public ServiceLifetime Lifetime { get; set; } = ServiceLifetime.Scoped;
}